Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: query bookmarks feedback changes #1295

Merged
merged 6 commits into from
Jul 12, 2024
Merged

Conversation

saravmajestic
Copy link
Collaborator

@saravmajestic saravmajestic commented Jul 11, 2024

Overview

changes

  • use jinja-sql language instead of sql to have jinja/dbt auto completions as well
  • open editor with code from bookmarks/history tab
  • fix saving doc editor, when new column with test is saved
  • added message in welcome screen in query panel to help users to enable bookmarks feature
  • toggle bookmark's privacy while opening share popup

Screenshot/Demo

image

How to test

  • Steps to be followed to verify the solution or code changes
  • Mention if there is any settings configuration added/changed/deleted

Checklist

  • I have run this code and it appears to resolve the stated issue
  • README.md updated and added information about my change

@saravmajestic saravmajestic self-assigned this Jul 11, 2024
@saravmajestic saravmajestic linked an issue Jul 11, 2024 that may be closed by this pull request
1 task
}
commands.registerCommand(
"dbtPowerUser.createSqlFile",
async ({ code, name }: { code?: string; name?: string }) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To open the code from bookmarks tab, added 2 arguments, code and fileName

window.createTextEditorDecorationType({
rangeBehavior: DecorationRangeBehavior.OpenOpen,
});
const fileNamePrefix = name || "poweruser";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no other change except this fileNamePrefix

editBuilder.replace(entireDocumentRange, "\n");
workspace.openTextDocument(uri).then((doc) => {
// set this to sql language so we can bind codelens and other features
languages.setTextDocumentLanguage(doc, "jinja-sql");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use jinja-sql language

@saravmajestic saravmajestic linked an issue Jul 11, 2024 that may be closed by this pull request
1 task
: typeof self < "u"
? self
: {};
? window
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the changes in this file are formatting changes and this is generated from altimate-components

@saravmajestic saravmajestic changed the title fix: show contact us for enabling bookmarks fix: query bookmarks feedback changes Jul 11, 2024
if (document.uri.scheme !== "untitled" && document.languageId !== "sql") {
if (
document.uri.scheme !== "untitled" &&
document.languageId !== "jinja-sql"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

converted the new query sql file from sql language to jinja-sql so we can use jinja autocompletes

}
commands.registerCommand(
"dbtPowerUser.createSqlFile",
async ({ code, fileName }: { code?: string; fileName?: string }) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added these 2 arguments to display selected code from bookmark or history details and with filename

@anandgupta42 anandgupta42 merged commit d2a68ff into master Jul 12, 2024
7 checks passed
@saravmajestic saravmajestic deleted the fix/bookmarks-preview branch July 12, 2024 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In New query editor, dbt auto completions are not working Not able to save from documentation editor
2 participants